<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserWithdraw extends Model
{
    const CREATED_AT = 'apply_time';

    const UPDATED_AT = null;

    protected $fillable  = [
        'type',
        'user_id',
        'withdraw_commission',
        'withdraw_amount',
        'amount_received',
        'reject_reason',
        'status',
        'withdraw_info',
        'apply_time',
        'audit_time',
    ];

    protected $attributes = [
        'status' =>1,
        'withdraw_commission' => 0,
        'reject_reason' => '',
    ];

    protected $casts = [
        'withdraw_info' => 'array'
    ];
}
